<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Choose a restaurant_{$webname}</title>
<meta name="keywords"    content="{$keywords}">
<meta name="description" content="{$description}">

<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--公共样式结束-->
<!--页面样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_restaurant.css" />
<!--页面样式结束-->
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery.SuperSlide.2.1.1.js"></script>
</head>

<body>
	<div class="zhezhao"></div>
<div class="zz">
	<!--top start-->
	<include file="Public:header" lang="true" />
	<!--top end-->
	<!--content start-->
	<div class="content">
		<div class="buzou clearfix">
			<div class="buzou_left clearfix">
				<dl>
					<dt>1.Select a location</dt>
					<dd><a href="{:U('Index/address')}"></a></dd>
				</dl>
				<dl class="hover">
					<dt>2.Restaurant</dt>
					<dd><a href="{:U('Restaurant/index')}"></a></dd>
				</dl>
				<dl>
					<dt>3.Choose dishes</dt>
					<dd></dd>
				</dl>
				<dl>
					<dt>4.Confirm Order</dt>
					<dd></dd>
				</dl>
				<dl>
					<dt>5.Complete order</dt>
					<dd></dd>
				</dl>
			</div>
			<div class="buzou_right">
				<a href="http://vipwebchat.tq.cn/pageinfo.jsp?version=vip&admiuin=9632675&ltype=100&iscallback=0&page_templete_id=79615&is_message_sms=0&is_send_mail=0&action=acd&acd=1&type_code=1" target=_blank><img src="http://float2006.tq.cn/staticimg.jsp?version=vip&admiuin=9632675&ltype=100&action=acd&acd=1&type_code=1&onlinepic=http://userfiles.tq.cn/userfiles/upload_163/9632675/1411565972.png&offlinepic=http://userfiles.tq.cn/userfiles/upload_163/9632675/1411628431.png" border='0' /></a>
			</div>
		</div>
		<!--search开始-->
		<!--  <div class="search clearfix">
			<div class="search_ico">
				<img src="{$NOW_THEME_URL}/Assets/Images/search_ico.jpg" />
			</div>
			<div class="search_text">
				<form action="" method="get" class="clearfix">
					<input class="st2 width_400" name="" type="text" />
					<input class="st3 width_100" name="" type="button" value="Search" />
				</form>
			</div>
		</div>-->
		<!--search结束-->
		<div class="restaurant clearfix">
			<div class="rr">
				<!--rest_right start-->
				<div class="rest_right rest_right1">
					<div class="rr_title">Announcement</div>
					<div class="rr_content">
						<i class="icon-volume-up"></i>&nbsp;&nbsp;
						<span>{$announcement}</span>
					</div>
				</div>
				<!--rest_right end-->
				<!--rest_right start-->
				<div class="rest_right rest_right2">
					<div class="rr_title">News</div>
					<div class="rr_content">
						<!---->
						<div class="txtScroll-top">
							<div class="bd">
								<ul class="infoList">
									<volist name="article" id="v">
										<li><span class="date">{$v.addtime|date="Y-m-d",###}</span>
											<a href="{:U('Url/detail','id='.$v['id'])}" target="_blank">{$v.title}</a>
										</li>
									</volist>
								</ul>
							</div>
						</div>
						<!---->
					</div>
				</div>
				<!--rest_right end-->
				<!--rest_right start-->
				<div class="rest_right rest_right3">
					<div class="rr_title">Food Category</div>
					<div class="rr_content">
						<volist name="cuisine" id="vo" >
							<a href="{:U('Restaurant/index','cuisine='.$vo['id'])}"
							<eq name='vo.id' value='$Think.get.cuisine'>class='hover'</eq>>{$vo.entitle}</a>
						</volist>
					</div>
				</div>
				<!--rest_right end-->
			</div>
			
			
			<!--rest_left start-->
			<div class="rest_left">
			<!--rl_title start-->
			
			
			<div class="rl_location">
				<span>Your Location:</span><em class="location_em">{$query.enadds}</em>&nbsp;&nbsp;&nbsp;&nbsp;
				<a style="font-size:12px;color:#FF6600" href="index.php">wrong？</a>
			</div>			
						
			<volist name="view" id="v">	
				<neq name="v.more" value="1">
				
				<div class="rl_title clearfix">
					<span class="price servie0">
						<h1>￥{$v.price}</h1>
						<h2>Delivery fee</h2>
					</span>
					<span class="near">
						Here is/are the restaurant/s near your location. 
					</span>
					<span class="time clearfix">
						<span><img src="{$NOW_THEME_URL}/Assets/Images/timeico.jpg" width="36" height="50" /></span>
                           <span><p class="timenum color_main">{$v.time}</p><p class="timedw color_main">mins</p></span>
					</span>
				</div>
				<!--rl_title end-->
				
				<!--rl_content start-->
				<div class="rl_content clearfix">
					<table border="0" cellpadding="0" cellspacing="0">
						<thead>
							<tr class="color_main">
								<th>Restaurant<i class="icon-caret-down"></i></th>
								<td>Rating<i class="icon-caret-down"></i></td>
								<td>Cuisine<i class="icon-caret-down"></i></td>
							</tr>
						</thead>
						<tbody>
							
						<foreach name="v.arr" item="k">
							<tr rtitle="{$k.detail.entitle}" id="{$k.detail.id}" isgao="{$v.isgao}" gaotime="{$v.gaotime}" openTime="{$k.detail.starthours}" closeTime="{$k.detail.endhours}"
								openTimes="{$k.detail.starthours1}" closeTimes="{$k.detail.endhours1}" <notempty name="k.detail.close">close="close"</notempty> tingye="{$k.detail.is_tingye}">
								<th>
									<span class="tishispan">
										<div class="tishi clearfix" >
											<php>if(find_resource($k['detail']['solevar'],'thumb')!=""){</php>
												<span class="tishileft">
													<img src="{$Think.UPLOAD_PATH}{$k.detail.solevar|find_resource=###,'thumb'}" />
												</span>
											<php>}</php>	
											<span class="tishiright">
												<h1>
													Opening Hour:{$k.detail.starthours}-{$k.detail.endhours}
													<notempty name='k.detail.starthours1'>&nbsp;&nbsp;&nbsp;{$k.detail.starthours1}-{$k.detail.endhours1}</notempty>
												</h1>
												<!-- <h2>{$k.detail.encontent}</h2> -->
												<h3><!--<em>Address:</em>-->{$k.detail.enssxadd}</h3>
											</span>
										</div>
										<a href="{:U('Dishes/index','id='.$k['detail']['id'])}">
											{$k.detail.entitle|stripslashes=###}
											<eq name='k.detail.is_tingye' value='1'><em style="color:red">（Suspension of business）</em></eq>
										</a>
										<eq name="v.exempt" value="2"><span class="mian"><img src="{$NOW_THEME_URL}/Assets/Images/mian2.png" /></span></eq>
										<neq name='k.detail.is_tingye' value='1'><notempty name="k.detail.close"><em style="color:red">（Take Break）</em></notempty></neq>
									</span>
								</th>
								<td class="score">
									<div class="starbg" style="width:{$k.detail.level}%;"></div>
									<div class="star"></div>
								</td>
								<td class="fenlei">
									<a title="">
										<volist name="cuisine" id="n">
											<foreach name="k.detail.cuisine" item="m" key="o">
												<eq name="n.id" value="$m">{$n.entitle}&nbsp;</eq>
											</foreach>
										</volist>
									</a>
								</td>
							</tr>
						</foreach>	

	
						</tbody>	
					</table>
				</div>
				
			<else />
				<div class="moreRes" more="1" style="display:none" >
				<div class="rl_title clearfix">
					<span class="price servie0">
						<h1>￥{$v.price}</h1>
						<h2>Delivery fee</h2>
					</span>
					
					<eq name="v.far" value="1">
						<span class="nears">Late night order (21:00----22:00)will be charged both the round taxi fee  (85RMB) and delivery fee  (15RMB)</span>
					<else />
						<span class="near">Here it far from the location of your restaurant</span>
					</eq>
					
					<span class="time clearfix">
						<span><img src="{$NOW_THEME_URL}/Assets/Images/timeico.jpg" width="36" height="50" /></span>
                           <span><p class="timenum color_main">{$v.time}</p><p class="timedw color_main">mins</p></span>
					</span>
				</div>
				<!--rl_title end-->
				
				<!--rl_content start-->
				<div class="rl_content clearfix">
					<table border="0" cellpadding="0" cellspacing="0">
						<thead>
							<tr class="color_main">
								<th>Restaurant<i class="icon-caret-down"></i></th>
								<td>Rating<i class="icon-caret-down"></i></td>
								<td>Cuisine<i class="icon-caret-down"></i></td>
							</tr>
						</thead>
						<tbody>
							
						<foreach name="v.arr" item="k">
							<tr rtitle="{$k.detail.entitle}" id="{$k.detail.id}" isgao="{$v.isgao}" gaotime="{$v.gaotime}" openTime="{$k.detail.starthours}" closeTime="{$k.detail.endhours}" 
								openTimes="{$k.detail.starthours1}" closeTimes="{$k.detail.endhours1}" <notempty name="k.detail.close">close="close"</notempty> tingye="{$k.detail.is_tingye}">
								<th>
									<span class="tishispan">
										<div class="tishi clearfix" >
											<php>if(find_resource($k['detail']['solevar'],'thumb')!=""){</php>
												<span class="tishileft">
													<img src="{$Think.UPLOAD_PATH}{$k.detail.solevar|find_resource=###,'thumb'}" />
												</span>
											<php>}</php>
											<span class="tishiright">
												<h1>
													Opening Hour:{$k.detail.starthours}-{$k.detail.endhours}
													<notempty name='k.detail.starthours1'>&nbsp;&nbsp;&nbsp;{$k.detail.starthours1}-{$k.detail.endhours1}</notempty>
												</h1>
												<!-- <h2>{$k.detail.encontent}</h2> -->
												<h3><!--<em>Address:</em>-->{$k.detail.enssxadd}</h3>
											</span>
										</div>
										<a href="{:U('Dishes/index','id='.$k['detail']['id'])}">
											{$k.detail.entitle|stripslashes=###}
											<eq name='k.detail.is_tingye' value='1'><em style="color:red">（Suspension of business）</em></eq>
										</a>
										<eq name="v.exempt" value="2"><span class="mian"><img src="{$NOW_THEME_URL}/Assets/Images/mian2.png" /></span></eq>
										<neq name='k.detail.is_tingye' value='1'><notempty name="k.detail.close"><em style="color:red">（Take Break）</em></notempty></neq>
									</span>
								</th>
								<td class="score">
									<div class="starbg" style="width:{$k.detail.level}%;"></div>
									<div class="star"></div>
								</td>
								<td class="fenlei">
									<a title="">
										<volist name="cuisine" id="n">
											<foreach name="k.detail.cuisine" item="m" key="o">
												<eq name="n.id" value="$m">{$n.entitle}&nbsp;</eq>
											</foreach>
										</volist>
									</a>
								</td>
							</tr>
						</foreach>	

	
						</tbody>	
					</table>
					</div>	
				</div>
			</neq>
			<!--rl_content end-->
			</volist>

			
				<div class="more"><a class="readMore">Show me more restaurants that are farther than those listed above(with higher delivery fee)</a></div>
			</div>
			<!--rest_left end-->
		</div>
	</div>
	<!--content end-->
	
	<!--footer start-->
	<include file="Public:footer" lang="true" />
	<!--footer end-->
	<!--online start-->
		
	<!--online end-->
</div>
<!--营业时间弹出窗口开始-->
<div class="timeck selecttime" restid="">
	<h1>Non-opening Time Notice for (<em class="ztitle"></em>)</h1>
	<p>（<em class="ztitle"></em>)is opening during(the time for delivery)<span id="hours">10.30 a.m. until 10.30 p.m.</span> you can either place a pre-order or could not order until it reopens next time.</p>
	<h3><a id="viewHref" href="{:U('Dishes/index')}" class="lb">View Menu</a><a class="ck comeBack" style="cursor:pointer">Back to list</a></h3>
</div>	
<!--营业时间弹出窗口结束-->
<!--没有选择城市弹出窗口开始-->
<div class="cityck selectcity">
	<h1>You haven't select the correct address, click the button to choose the address</h1>
	<h3><a href="{:U('Index/index')}" class="ck">To choose the city</a></h3>
</div>	
<div class="timeck isgaofeng">
	<h1>Now is the rush-hour for ordering, so the delivery time will be <em id="gaotime"></em> minutes longer than usual!</h1>
	<h3><a id="gaohref" href="{:U('Dishes/index')}" class="lb">Confirm</a><a class="ck comeBack" style="cursor:pointer">Back</a></h3>
</div>
<!--没有选择城市弹出窗口结束-->
<script type="text/javascript">
	jQuery(".txtScroll-top").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"topLoop",autoPlay:true,vis:4});
	
	//获取菜品分类的值
	$('.fenlei').on('hover',function(){
		var fenleival = $(this).children('a').html();
		fenleival     = fenleival.replace(/\s+/g,"");                                       
		$(this).children('a').attr({title:fenleival});
	});
	
	<notempty name="noneCity">
		$('.selectcity').show();
		$('.zhezhao').show();
	</notempty>
	
	//返回顶部
	$(window).on('scroll',function(){
		var scrollTop = $(document).scrollTop();
	});
	
	//如果没有更多餐厅，则不显示加载按钮
	var m = $('.moreRes').attr("more");
	if(m==""){
		$('.more').remove();
	}
	
	//加载更多
	$('.readMore').click(function(){
		var m = $('.moreRes').attr("more");
		$(this).parents('.more').remove();
		if(m){
			$('.moreRes').show();
		}else{
			alert("We're sorry, no more restaurant!");
		}
	});
	
	//营业时间弹出窗
	$(".rl_content table tr a").removeAttr("href");
	$('.rl_content table tbody tr').click(function(){
		
		var tingye  = $(this).attr('tingye');
		var close   = $(this).attr("close");
		var id      = $(this).attr("id");
		var isgao   = $(this).attr("isgao");
		var gaotime = $(this).attr("gaotime");
		
		if(tingye==1){
			alert('The restaurant to suspend business~！');return false;
		}
		
		if(isgao==1){
			$('.isgaofeng').show();
			$('.zhezhao').show();
			$("#gaohref").attr("href","{:U('Dishes/index')}&id="+id);
			$("#gaotime").html(gaotime);
		}else{
			if(close){
				
				$('.selecttime').show();
				$('.zhezhao').show();
				
				var title = $(this).attr("rtitle");
				$('.ztitle').each(function(){
					$(this).html(title);
				});
				
				$("#viewHref").attr("href","{:U('Dishes/index')}&id="+id);
				setOpenCloseTime($(this));
				$('.zhezhao').click(function(){
					$('.zhezhao').hide();
					$('.selecttime').hide();
				});
			}else{
				window.location.href="{:U('Dishes/index')}&id="+id;
			}
		}
	});
	
	$(function(){
		$(".comeBack").click(function(){
			$('.zhezhao').hide();
			$('.timeck').hide();
		});
		
		//餐厅提示
		$('.tishispan').hover(function(){
			$(this).children('div').toggle();
		});
		
		//悬浮框显示隐藏
		$('.online').on('hover',function(){
			$('.online ul').toggle();
			//$('.rlico').toggleClass('rlico2');
		});
		
		var value= location.href.split("=")[1];
	    //alert(value);
		//$('.addr').html(decodeURI(value));

	});
	
	function setOpenCloseTime(obj){
		var openTime  = obj.attr("openTime");
		var closeTime = obj.attr("closeTime");
		var openTimes  = obj.attr("openTimes");
		var closeTimes = obj.attr("closeTimes");
		var html       = "";
		
		if(openTimes){
			html = openTime+'-'+closeTime+' or '+openTimes+'-'+closeTimes;
		}else{
			html = openTime+'-'+closeTime;
		}
		
		$("#hours").html(openTime+'-'+closeTime);
		$("#openTime").html(openTime);
		$("#sendTime").html(openTime);
	}
	
	function addressval(){
		var addressval1 = $('.address h3 input').val();	
		alert(addressval1);	
		if(addressval1 != ""){
			$('.address_choose').show();
		}else{
			$('.address_choose').hide();
		}
	}
</script>
</body>
</html>
